<template>
  <d2-container>
    <template slot="header">flexRAN 功能测试</template>
    <el-button type="primary" plainn @click="test">接口测试</el-button>
    <br><br>
    <json-viewer :value = "jsonData" copyable boxed v-show="showJsonData"> </json-viewer>
  </d2-container>
</template>

<script>
import Axios from 'axios'
export default {
  name: 'page1',
  data () {
    return {
      jsonData: '',
      showJsonData: false
    }
  },
  methods: {
    test () {
      Axios({
        method: 'get',
        url: '/api/capabilities'
      }).then((res) => {
        this.showJsonData = true
        this.jsonData = res.data
      })
    }
  }
}
</script>
